package 因子分解和枚举.三除数;

import java.util.Arrays;

/**
 * TODO
 *
 * @className: scs
 * @description: TODO
 * @author: 等什么柠檬君
 * @date: 2022-05-06 22:30
 **/
public class scs {
    /**
     * 此题被素数误导了 不需要素数判断
     * @param args
     */
    public static void main(String[] args) {
        System.out.println("81 "+isThree(81));
        System.out.println("14 "+isThree(14));
        System.out.println("4 "+isThree(4));
    }

    public static boolean isThree(int n) {

        int[] ss = new int[n+1];
        for (int i = 1; i <= n ; ++i) {
            ss[i] = i;
        }
        System.out.println(Arrays.toString(ss));
        int count = 0;
        for (int i = 2; i <= ss.length - 1; i++) {
            if (ss[i] == 0 ){
                continue;
            }
            if (n % ss[i] == 0){
                System.out.println(n+"可以被"+ss[i]+" 整除");
                ++count;
            }

        }
        System.out.println("结果 "+count);
        return count + 1 == 3;
    }

}
